const res = new Promise((resolve, reject) => {
  resolve()
})
  .then(function f1() {
    console.log('f1')
  })
  .then(function f2(res) {
    console.log(res)
  })
